using System.Data.Entity.ModelConfiguration;

namespace OBUCare.Core.Models.Mapping
{
    public class View_Transaction_Serial_InfoMap : EntityTypeConfiguration<View_Transaction_Serial_Info>
    {
        public View_Transaction_Serial_InfoMap()
        {
            // Primary Key
            this.HasKey(t => t.TLogID);

            // Properties
            this.Property(t => t.SERIAL_NO)
                .HasMaxLength(100);

            this.Property(t => t.USER_NO)
                .HasMaxLength(14);

            this.Property(t => t.USER_NAME)
                .HasMaxLength(120);

           

            this.Property(t => t.OPERATION_KIND_Title)
                .HasMaxLength(50);

            this.Property(t => t.tLogOperator)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.tLogOperatorName)
                .HasMaxLength(50);

            this.Property(t => t.SERIAL_log_Operator)
                .IsFixedLength()
                .HasMaxLength(6);

            this.Property(t => t.SERIAL_log_OperatorName)
                .HasMaxLength(50);

            this.Property(t => t.AGENT_NO)
                .IsFixedLength()
                .HasMaxLength(12);

            this.Property(t => t.AGENT_TYPE_NO)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.AGENT_NAME)
                .HasMaxLength(50);
            this.Property(t => t.STATUS);

            // Table & Column Mappings
            this.ToTable("View_Transaction_Serial_Info");
            this.Property(t => t.TLogID).HasColumnName("TLogID");
            this.Property(t => t.SERIAL_ID).HasColumnName("SERIAL_ID");
            this.Property(t => t.SERIAL_NO).HasColumnName("SERIAL_NO");
            this.Property(t => t.USER_NO).HasColumnName("USER_NO");
            this.Property(t => t.USER_NAME).HasColumnName("USER_NAME");
            this.Property(t => t.OPERATION_KIND).HasColumnName("OPERATION_KIND");
            this.Property(t => t.OPERATION_KIND_Title).HasColumnName("OPERATION_KIND_Title");
            this.Property(t => t.AMOUNT).HasColumnName("AMOUNT");
            this.Property(t => t.FUNDINFO).HasColumnName("FUNDINFO");
            this.Property(t => t.FUND_REMARK).HasColumnName("FUND_REMARK");
            this.Property(t => t.RECORD_TIME).HasColumnName("RECORD_TIME");
            this.Property(t => t.tLogOperator).HasColumnName("tLogOperator");
            this.Property(t => t.tLogOperatorName).HasColumnName("tLogOperatorName");
            this.Property(t => t.SERIAL_log_Operator).HasColumnName("SERIAL_log_Operator");
            this.Property(t => t.SERIAL_log_OperatorName).HasColumnName("SERIAL_log_OperatorName");
            this.Property(t => t.AGENT_NO).HasColumnName("AGENT_NO");
            this.Property(t => t.AGENT_TYPE_NO).HasColumnName("AGENT_TYPE_NO");
            this.Property(t => t.AGENT_NAME).HasColumnName("AGENT_NAME");
            this.Property(t => t.STATUS).HasColumnName("STATUS");
        }
    }
}
